<?include ($_SERVER ["DOCUMENT_ROOT"] . "/lib/module/conn_db.php");?>
<?include ($_SERVER ["DOCUMENT_ROOT"] . "/lib/module/Util.php");?>
<?php $util=new Util();?>
<?include ($_SERVER ["DOCUMENT_ROOT"] . "/lib/module/BoardConf.php");?>
<?include ($_SERVER ["DOCUMENT_ROOT"] . "/lib/module/BoardArticle.php");?>
<?include ($_SERVER ["DOCUMENT_ROOT"] . "/lib/module/BoardFile.php");?>
<?include ($_SERVER ["DOCUMENT_ROOT"] . "/lib/module/BoardComment.php");?>
<?php $bConf=$_GET['bConf'];
$condition = $_GET ['condition']; // 검색영역
$words = $_GET ['words']; // 검색어
$sid = $_GET['sid'];
$mode = $_GET["mode"];

$category_sid = $_GET ['category_sid'];
?>
<? include "inc/inc_header.php" ?><!-- header -->
<script type="text/javascript" src="/lib/js/validator.js"></script>
<script type="text/javascript">
	function chkWrite()
	{
		var obj = document.forms["write"];
		if (!isTextValidate(obj.article_title, "string", 0, "제목"))		return false;
		if (!isTextValidate(obj.article_pw, "string", 0, "비밀번호"))		return false;
		if (!isTextValidate(obj.article_writer, "string", 0, "글쓴이"))		return false;

		return true;
	}
</script>
<?php $title = "게시판"; $sub_title="게시판";?>
<body style="background-repeat: repeat-x; overflow-x:hidden;" oncontextmenu="return false" onselectstart="return false" ondragstart="return false">
<?include ($_SERVER ["DOCUMENT_ROOT"] . "/lib/include/inc_board_article_edit_view.php");?>
	<?$txt=9?>
	<? include "inc/inc_top.php" ?><!-- top -->

	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	  <tr>
		<td style="BACKGROUND-IMAGE: url(img/surn/cont_bg04.jpg); BACKGROUND-REPEAT: repeat-x; BACKGROUND-position:right top;">&nbsp;</td>
		<td width="994" align="right" style="BACKGROUND-IMAGE: url(img/surn/cont_bg06.jpg); BACKGROUND-REPEAT: repeat-x; BACKGROUND-position:center top;padding-bottom:16px;">
		<iframe id="ifrm" name="ifrm" frameborder="0" style="display:none"></iframe>
	<form name="write" enctype="multipart/form-data" method="post" action="/admin/board/board_article_write_proc_free.php" onsubmit="return chkWrite()" target="ifrm">
				<input type="hidden" name="menuBid" value="<?=$menuBid?>" />
				<input type="hidden" name="menuSid" value="<?=$menuSid?>" />
				<input type="hidden" name="condition" value="<?=$condition?>" />
				<input type="hidden" name="words" value="<?=$words?>" />
				<input type="hidden" name="bConf" value="<?=$bConf?>" />
				<input type="hidden" name="page" value="<?=$page?>" />
				<input type="hidden" name="mode" value="<?=$mode?>" />
				<?if($mode=="write"){?>
				<input type="hidden" name="next" value="/free01.php" />
				<input type="hidden" name="article_writer_id" value="<?=$adminInfo->id?>" />
				<input type="hidden" name="article_ref_yn" value="N" />
				<?}else if($mode=="modify"){?>
				<input type="hidden" name="next" value="/free01_v.php" />
				<input type="hidden" name="sid" value="<?=$obj->article_sid?>" />
				<input type="hidden" name="org_title_image" value="<?=$obj->article_title_img?>" />
				<?}?>

				<input type="hidden" name="category_sid" value="<?=$category_sid?>" />

		<table width="954" border="0" cellspacing="0" cellpadding="0">
		  <tr>
			<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
				  <tr>
					<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
						  <td height="2" bgcolor="#212725"></td>
						</tr>
						<tr>
						  <td><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#585858">
							  <tr>
								<td width="70%" height="30" align="center" class="dbtit01"><strong>제목</strong></td>
								<td width="1"><img src="img/board/list_line.gif" width="1" height="8" /></td>
								<td width="18%" align="center" class="dbtit01"><strong>글쓴이</strong></td>
								<td width="1"><img src="img/board/list_line.gif" width="1" height="8" /></td>
								<td width="12%" align="center" class="dbtit01"><strong>비밀번호</strong></td>
							  </tr>
						  </table></td>
						</tr>
						<tr>
						  <td height="1" bgcolor="#585858"></td>
						</tr>
						<tr>
						<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
							  <tr>
								<td width="70%" height="30" align="center" class="dbtit01" style="color:#000;"><input type="text" id="article_title" name="article_title" class="in" size="90" value="<?=$obj->article_title?>" /></td>
								<td width="1"><img src="img/board/list_line.gif" width="1" height="8" /></td>
								<td width="18%" align="center" class="dbtit01" style="color:#000;"><input type="text" id="article_writer" name="article_writer" class="in" size="10" value="<?=$obj->article_writer?>" /></td>
								<td width="1"><img src="img/board/list_line.gif" width="1" height="8" /></td>
								<td width="12%" align="center" class="dbtit01" style="color:#000;"><input type="password" id="article_pw" name="article_pw" class="in" size="10" value="<?=$obj->article_pw?>" maxlength="5"/></td>
							  </tr>
						  </table></td>
						</tr>
						<tr>
						  <td height="1" bgcolor="#585858"></td>
						</tr>
					</table></td>
				  </tr>
				  <tr>
					<td>
					  <table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
						  <td height="28"><table width="100%" height="28" border="0" cellpadding="0" cellspacing="0">
							  <tr>
								<td width="68%" class="dbtop9" style="padding-left:12px">
								<script src="/lib/CKEditor/ckeditor.js"></script>
								<textarea id="article_contents1" name="article_contents1" class="in" style="width:680px;height:75px"><?=$obj->article_contents1;?></textarea>
							<script type="text/javascript">
								CKEDITOR.replace("article_contents1", {
									filebrowserImageUploadUrl : "/lib/CKEditor/uploader/upload.php?type=image",
									filebrowserFlashUploadUrl : "/lib/CKEditor/uploader/upload.php?type=flash",
									uiColor: '#FAFAFA'
								});
							</script></td>
							  </tr>
						  </table></td>
						</tr>
						<tr>
						  <td height="1" bgcolor="#BCBCBC"></td>
						</tr>
					  </table>
					 </td>
				  </tr>
				</table></td>
			  </tr>
			  <tr>
				<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
				  <tr>
					<td height="30" align="right" valign="bottom"><input type="image" src="img/board/bt_ok.gif" style="width:50px;height:22px;">
					</td>
					<td height="30" width="60" align="right"><a href="free01.php?<?=$addStr?>"><img src="img/board/bt_list.gif" width="50" height="22" border="0"></a></td>
				  </tr>
				</table></td>
			  </tr>
			</table></td>
		  </tr>
		</table>	</form></td>
		<td style="BACKGROUND-IMAGE: url(img/surn/cont_bg05.jpg); BACKGROUND-REPEAT: repeat-x; BACKGROUND-position:left top;">&nbsp;</td>
	  </tr>
	</table>

	<? include "inc/inc_bottom.php" ?><!-- bottom -->
<? include "inc/inc_footer.php" ?><!-- footer -->